package com.atguigu.guli.service.trade.feign.fallback;

import com.atguigu.guli.common.base.result.R;
import com.atguigu.guli.service.base.dto.CourseDto;
import com.atguigu.guli.service.trade.feign.EduCourseFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author zero
 * @desc
 * @create 2020/5/30
 */
@Service
@Slf4j
public class EduCourseFeignFallBack implements EduCourseFeign {
    /**
     * 调用feign接口
     *
     * @param courseId 课程id
     * @return 查询结果
     */
    @Override
    public CourseDto getCourseDtoById(String courseId) {
        log.info("熔断保护");
        return null;
    }

    @Override
    public R updateBuyCountById(String id) {
        log.error("熔断器被执行");
        return R.error();
    }
}
